package com.gs.netty.websocket.remoting.req;
import com.gs.netty.websocket.remoting.WebSocketInvocation;
import com.gs.netty.websocket.remoting.resp.AppResponse;
import com.gs.netty.websocket.remoting.resp.WebSocketResponse;

public class WebSocketRequest extends SocketRequest<WebSocketInvocation> {

    private WebSocketInvocation webSocketInvocation;

    public WebSocketRequest(WebSocketInvocation webSocketInvocation) {
        this.webSocketInvocation = webSocketInvocation;
    }

    @Override
    public String getCommand() {
        return webSocketInvocation.getCommand();
    }

    @Override
    public String getPayload() {

        return webSocketInvocation.getPayload();
    }
    @Override
    public Integer getRequestId() {
        return webSocketInvocation.getRequestId();
    }

    public WebSocketInvocation getWebSocketInvocation() {
        return webSocketInvocation;
    }

    @Override
    public WebSocketInvocation createResponse() {

        return (WebSocketInvocation) webSocketInvocation.create();
    }


}
